package com.youlai.boot.modules.game.converter;

import com.youlai.boot.modules.game.model.entity.GameUserPoints;
import com.youlai.boot.modules.game.model.vo.GameLeaderboardVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 游戏排行榜对象转换器
 *
 * @author 有来技术团队
 */
@Mapper
public interface GameLeaderboardConverter {

    GameLeaderboardConverter INSTANCE = Mappers.getMapper(GameLeaderboardConverter.class);

    /**
     * 实体转VO
     */
    @Mapping(source = "userId", target = "id")
    GameLeaderboardVO entity2vo(GameUserPoints entity);

    /**
     * 实体列表转VO列表
     */
    List<GameLeaderboardVO> entityList2voList(List<GameUserPoints> entityList);
} 